﻿<UserControl x:Class="LantixLBSServer.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"  xmlns:Mapabc="clr-namespace:Com.Mapabc.Maps.Api;assembly=Mapabc.SilverLight.API"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <Mapabc:MMap x:Name="map" Scale="Show" Toolbar="Visible" OverViewMap="Show"  Center="116.397428,39.90923" ZoomLevel="5">
        </Mapabc:MMap>
        <Border x:Name="showMapBorder" BorderThickness="5" CornerRadius="5" Width="270"  BorderBrush="#16589a" Opacity="0.9" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,10,170,0">
            <StackPanel>
                <StackPanel>

                    <!--Orientation="Horizontal-->
                    <Border Background="#16589a" Width="260" Height="25" Opacity="0.8">
                        <TextBlock Text="获取单击点坐标" TextAlignment="Left" Foreground="#ffffff" Margin="10,3,0,0" FontWeight="Bold" FontSize="12"/>
                    </Border>
                    <StackPanel Background="White" Width="260" Height="85">

                        <Canvas>
                            <TextBlock FontSize="12" Height="25" Margin="10,10,0,0" Text="单击点经度坐标："/>
                            <TextBox FontSize="12" Width="140" Height="22" Margin="110,5,0,0" Text="" x:Name="LngX"/>
                            <TextBlock FontSize="12" Height="25" Margin="10,38,0,0" Text="单击点纬度坐标："/>
                            <TextBox FontSize="12" Width="140" Height="22" Margin="110,33,0,0" Text="" x:Name="LatY"/>
                        </Canvas>

                    </StackPanel>

                </StackPanel>
                <StackPanel>
                <!--Orientation="Horizontal-->
                <Border Background="#16589a" Width="260" Height="25" Opacity="0.8">
                    <TextBlock Text="设置地图缩放级别和中心点" TextAlignment="Left" Foreground="#ffffff" Margin="10,3,0,0" FontWeight="Bold" FontSize="12"/>
                </Border>
                <StackPanel Background="White" Width="260" Height="160">
                    <Canvas>
                        <TextBlock FontSize="12" Height="25" Margin="10,5,0,0" Text="设置地图中心点经纬度坐标和缩放级别"/>
                        <TextBlock FontSize="12" Height="25" Margin="10,30,0,0" Text="输入经度坐标："/>
                        <TextBox FontSize="12" Width="155" Height="22" Margin="95,25,0,0" Text="116.397428" x:Name="mapLngX"/>
                        <TextBlock FontSize="12" Height="25" Margin="10,55,0,0" Text="输入纬度坐标："/>
                        <TextBox FontSize="12" Width="155" Height="22" Margin="95,50,0,0" Text="39.90923" x:Name="mapLatY"/>
                        <TextBlock FontSize="12" Height="25" Margin="10,80,0,0" Text="输入缩放级别："/>
                        <Slider Width="140" Height="25" Margin="95,75,0,0" Maximum="17" Minimum="3" Value="12" x:Name="mapZoom"/>
                        <TextBlock FontSize="12" Height="25" Margin="235,80,0,0" Text="12" x:Name="mapZoomValue"/>
                        <Button Content="设置地图中心点和缩放级别" FontSize="12" Width="155" Height="25" Margin="95,105,0,0" Background="#165798" Click="MsetZoomAndCenter">
                        </Button>

                    </Canvas>
                </StackPanel>
</StackPanel>
                <StackPanel>
                    <StackPanel>

                        <!--Orientation="Horizontal-->
                        <Border Background="#16589a" Width="260" Height="25" Opacity="0.8">
                            <TextBlock Text="刷新位置" TextAlignment="Left" Foreground="#ffffff" Margin="10,3,0,0" FontWeight="Bold" FontSize="12"/>
                        </Border>
                        <StackPanel Background="White" Width="260" >


                            <Button Content="刷新位置" FontSize="12" Width="155" Height="25"  Background="#165798" Click="Button_Click">
                            </Button>
                        </StackPanel>

                    </StackPanel>
                </StackPanel>
                <StackPanel>

                    <!--Orientation="Horizontal-->
                    <Border Background="#16589a" Width="260" Height="25" Opacity="0.8">
                        <TextBlock Text="设置偏移值坐标" TextAlignment="Left" Foreground="#ffffff" Margin="10,3,0,0" FontWeight="Bold" FontSize="12"/>
                    </Border>
                    <StackPanel Background="White" Width="260" Orientation="Horizontal" >
                            <TextBlock FontSize="12" Height="25"  Text="输入偏移值："/>
                        <TextBox FontSize="12" Width="140" Height="22"  Text="0.004,-0.002" x:Name="txtAmended"/>
                        
                    </StackPanel>
                    <StackPanel Background="White" Width="260" >


                        <Button x:Name="btnAmended" Content="根据修正值刷新位置" FontSize="12" Click="btnAmended_Click"
                                Width="155" Height="25"  Background="#165798" >
                        </Button>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
